<template>
  <div class="section user-info">
    <p class="user-info-title">
      <span class="info-title">个人资料</span>
      <a href="#" target="_blank">
        <span class="change-info">修改资料</span>
      </a>
    </p>

    <div class="info-personal">
      <div class="info-uid">
        <span class="info-command">UID</span>
        <span class="info-value">{{ UsePersonalDataStore.UID }}</span>
      </div>
      <div div class="info-birch">
        <span class="info-command">生日</span>
        <span class="info-value">{{ UsePersonalDataStore.birthday }}</span>
        <i class="iconfont icon-yincangbukejian"></i>
      </div>
    </div>
  </div>
</template>

<script lang="ts">
  import { defineComponent } from 'vue'
  export default defineComponent({
    name: 'PersonalData',
  })
</script>

<script lang="ts" setup>
  import { usePersonalDataStore } from '@/store/moudles/personalData'
  // const UID = inject('UID')
  // const birthday = inject('birthday')
  //调用store 读取数据
  const UsePersonalDataStore = usePersonalDataStore()
  // const UID = UsePersonalDataStore.UID
  // const birthday = UsePersonalDataStore.birthday
</script>

<style lang="less" scoped>
  .user-info-title {
    display: flex;
    justify-content: space-between;
    box-sizing: border-box;
    padding-bottom: 18px;
    border-bottom: 1px solid #e5e9ef;
    margin-bottom: 20px;
    .info-title {
      line-height: 23px;
      font-size: 14px;
      color: #222;
    }
    .change-info {
      display: inline-block;
      width: 56px;
      height: 22px;
      color: #9499a0;
      border: 0.5px solid #c0c9d4;
      text-align: center;
      font-size: 12px;
      line-height: 22px;
      border-radius: 4px;
    }
  }
  .info-personal {
    width: 308px;
    height: 21px;
    .info-uid,
    .info-birch {
      display: inline-block;
      width: 150px;
      .info-command {
        display: inline-block;
        width: 30px;
        font-size: 12px;
        line-height: 16px;
        color: #9499a0;
        margin-right: 16px;
      }
      .info-value {
        color: #6d757a;
        font-size: 12px;
        line-height: 16px;
        padding-right: 15px;
      }
      .icon-yincangbukejian {
        color: #c9ccd0;
        font-size: 12px;
        line-height: 20px;
      }
    }
  }
</style>
